package com.alex.megacj.alias;

import java.util.HashMap;
import java.util.Map;

public class AliasManager {

	private Map<String, String> aliasMap = new HashMap<String, String>();
	
	private Map<String, String> reverseAliasMap = new HashMap<String, String>();
	
	public void addAlias(String alias, String target) {
		aliasMap.put(alias, target);
		reverseAliasMap.put(target, alias);
	}

	public String resolveAlias(String host) {
		return aliasMap.get(host);
	}

	public String resolveAliasReverse(String host) {
		return reverseAliasMap.get(host);
	}
	
}
